#include <STC15F2K60S2.H>

uchar seg_dula[] ={0xc0,  
0xf9,  
0xa4,  
0xb0,  
0x99,  
0x92,  
0x82,  
0xf8,  
0x80,  
0x90,  0xff,0xbf,0x8e,0x89,0x8c,0x88};


uchar seg_wela[] = {0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};



void seg_disp(uchar wula,dula,porint)
{
	P0 = 0XFF;
	P2 = P2 &0X1F |0Xe0;
	P2 &=0X1F ;

	P0 = seg_wela[wula];
	P2 = P2 &0X1F |0Xc0;
	P2 &=0X1F ;

	P0 = seg_dula[dula];
	if(porint)
	P0 &=  0x7f;
	P2 = P2 &0X1F |0Xe0;
	P2 &=0X1F ;



}